import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  CreateDateColumn,
  UpdateDateColumn,
} from "typeorm";

@Entity()
export class Auth {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({
    length: 50,
    comment: "权限名称",
  })
  name: string;

  @Column({
    length: 50,
    comment: "权限key",
  })
  key: string;

  @Column({ default: "", comment: "备注" })
  des: string;

  @CreateDateColumn({
    type: "datetime",
    comment: "创建时间",
  })
  create_at: Date;

  @UpdateDateColumn({
    type: "datetime",
    comment: "更新时间",
  })
  update_at: Date;
}
